]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
workspace: Minor cleanup
authorFlorian Müllner <fmuellner@gnome.org>
Fri, 15 Jun 2012 13:52:47 +0000 (15:52 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Tue, 19 Jun 2012 16:24:52 +0000 (18:24 +0200)
_hideAllOverlays() has only been used in a single place for quite
some time now, so move its code into the caller and save a loop.

https://bugzilla.gnome.org/show_bug.cgi?id=678416

js/ui/workspace.js

index 25626fc5e16490d2ec8d3d8d1f2881d1a4905123..e00a86c0b9b6f6ddd022fc3f4ba694a4d7e34907 100644 (file)
@@ -1121,15 +1121,6 @@ const Workspace = new Lang.Class({
         }
     },
 
-    _hideAllOverlays: function() {
-        for (let i = 0; i < this._windows.length; i++) {
-            let clone = this._windows[i];
-            let overlay = this._windowOverlays[i];
-            if (overlay)
-                overlay.hide();
-        }
-    },
-
     _delayedWindowRepositioning: function() {
         if (this._windowIsZooming)
             return true;
@@ -1329,6 +1320,10 @@ const Workspace = new Lang.Class({
         // Position and scale the windows.
         for (let i = 0; i < this._windows.length; i++) {
             let clone = this._windows[i];
+            let overlay = this._windowOverlays[i];
+
+            if (overlay)
+                overlay.hide();
 
             clone.zoomFromOverview();
 
@@ -1353,8 +1348,6 @@ const Workspace = new Lang.Class({
                                  });
             }
         }
-
-        this._hideAllOverlays();
     },
 
     destroy : function() {